Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

457 experiment #487

Closed
wants to merge 5 commits into from
Closed

457 experiment #487

wants to merge 5 commits into from

Conversation

Dieterbe
Copy link
Contributor

@replay I think the first commit here is good. the second I have mixed feelings about. on one hand i disliked the mixed accounting logic (especially for hot adds) in both mockcache as well as the test, on the other hand, the new code is a tad more complex/verbose than what i would have liked :(

anyway just something i wanted to try and see how it looked. curious if you lean one way or the other.

replay and others added 5 commits January 17, 2017 07:50
- does aggmetric call the cache push callback every time a metric gets
  evicted from the ring buffer?
- does aggmetric add the chunk into the store if the node is primary?
- makes the devnullStore count how many times it's Add() got called
- does aggmetric not add the chunk into the store if the node is not primary?
this lets us simplify the unit tests and focus them on their business
logic
@replay
Copy link
Contributor

replay commented Jan 22, 2017

I agree that the first commit is nice.

Regarding the second one I'm not sure what the purpose of it is. I see that the test gets simplified by a small difference, because the callback lambda doesn't need to be instantiated in the test anymore and the test doesn't need to count the number of times addsIfHot got called. But apart from that it seems like MockCache has become much harder to understand due to all the lambdas being passed around, the original version was much simplers.

@Dieterbe Dieterbe closed this Jan 23, 2017
@Dieterbe Dieterbe deleted the 457-experiment branch September 18, 2018 09:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants